<template>
  <div class="container">
    <div class="left">
      <router-link class="link" to="/home" tag="div">首页</router-link>
      <router-link class="link" to="/news" tag="div">新闻</router-link>
      <router-link class="link" to="/user" tag="div">用户</router-link>
    </div>
    <div class="right">
      <div class="header">头部</div>
      <div class="content">
        <router-view></router-view>
      </div>
    </div>
    
  </div>
</template>

<script>

export default {
  name: 'App',
  components: {
  }
}
</script>

<style>
* {
  padding: 0;
  margin: 0;
}
.container {
  display: flex;
}
.left {
  width: 230px;
  height: 100vh;
  background-color: #333;
}
.right {
  width: calc(100% - 230px);
  height: 100vh;
  background-color: #aaa;
}
.link {
  width: 100%;
  height: 50px;
  line-height: 50px;
  text-align: center;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
}
.header {
  width: 100%;
  height: 60px;
  line-height: 60px;
  background-color: #fff;
}
.content {
  margin: 20px;
  height: 500px;
  background-color: #fff;
  border-radius: 20px;
  padding: 10px;
}
.active {
  background-color: rgb(16, 110, 216);
}
</style>
